module.exports = {
  configureWebpack: {
    externals: {
      AMap: 'AMap',
      AMapUI: 'AMapUI'
    }
  },
  publicPath: './',
  devServer: {
    // port: 57103,
    proxy: {
      '/api': {
        target: 'http://101.132.97.205:9401/api',
        // target: 'http://192.168.0.201:9401/api',
        changeOrigin: true, // 请求头是 target
        ws: true,
        pathRewrite: {
          '^/api': ''
        }

      }
    }
  },
  chainWebpack: config => {
    config.set('externals', {
      'element-ui': 'ELEMENT',
      axios: 'axios',
      vue: 'Vue',
      echarts: 'echarts',
      'vue-router': 'VueRouter'
    })
  }
}
